<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3.创建一个车的对象</title>
    <script>
        // 车的对象 包含重量、颜色、牌子、可以载人、拉货、耕田
        function Car(weight, color, logo) {
            this.weight = weight;
            this.color = color;
            this.logo = logo;
            this.application = function (application) {
                console.log(application);
            }
            this.application1 = function (application1) {
                console.log(application1);
            }
            this.application2 = function (application2) {
                console.log(application2);
            }
        }
        var car = new Car('重量', '颜色', '牌子')
        console.log(car.weight);
        console.log(car['color']);
        console.log(car['logo']);
        car.application('载人');
        car.application1('拉货');
        car.application2('耕田');
    </script>
</head>

<body>

</body>

</html>